package com.yunhe.java.pro10;

import org.apache.log4j.Logger;

/**
 * Created by Administrator on 2017/8/3 0003.
 */
public class Rizhi {
    public static void main(String[] args) {
//        Logger logger= Logger.getLogger(Rizhi.class);
//        logger.debug("debug");
//        logger.info("info");
//        logger.warn("warn");
//        logger.error("error");
        try
        {
            int a=args.length;
            int b=42/a;
            int c[]={1};
            c[42]=99;
            System.out.println("b="+b);
        }
        catch(ArithmeticException e)
        {
            System.out.println("除0异常："+e);
        }
        catch(ArrayIndexOutOfBoundsException e) {
            System.out.println("数组超越边界异常："+e);
        }

    }
}
